<!DOCTYPE HTML>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <script
  src="https://code.jquery.com/jquery-3.3.1.min.js"
  integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
  crossorigin="anonymous"></script>
        <script type="text/javascript">

            $(function(){

                $(":radio[name='sex']").click(function(event){
                    // 禁用事件的默认动作
                    event.preventDefault();
                })
                // 绑定一个鼠标单击事件
                .mouseup(function(){
                    $(this).prop("checked",!$(this).is(":checked"));
                });
            })
        </script>
  </head>
  <body>
    男：<input type="radio" name="sex" value="1"> 女：<input type="radio" name="sex" value="0">
 </body>
</html>